%h1.show Edit Show Information
%table.show
  - form_for @show, shows_url, :method => :put do |form|
    %tr
      %td.alongside_image{:rowspan => "12"}
        = render :partial => "map"
      %td.field_title Location:
      %td.field= form.text_field     :location
      %td.error= error_message_on    :show, :location
    %tr
      %td.field_title Street:
      %td.field= form.text_field     :street
      %td.error= error_message_on    :show, :street
    %tr
      %td.field_title City:
      %td.field= form.text_field     :city
      %td.error= error_message_on    :show, :city
    %tr
      %td.field_title State:
      %td.field= form.text_field     :state
      %td.error= error_message_on    :show, :state
    %tr
      %td.field_title Zip:
      %td.field= form.text_field     :zip
      %td.error= error_message_on    :show, :zip
    %tr
      %td.field_title Start time:
      %td.date_time= form.datetime_select("start_time")
      %td.error= error_message_on   :show, :start_time
    %tr
      %td.field_title End time:
      %td.date_time= form.datetime_select("end_time")
      %td.error= error_message_on    :show, :end_time
    %tr
      %td.field_title Description:
      %td.area= form.text_area      :description
      %td.error= error_message_on    :show, :description
    %tr
      %td.field_title Songs:
      %td.check_box_fields
        %table.album_songs
          - @songs.each do |song|
            %tr{:style => "background-color: #{cycle("#ffffff", "#e9e9e9")}"}
              %td.check_box
                = check_box_tag("album[song_ids][]", song.id, @show.songs.include?(song))
              %td.song_name
                %a{:href => song_url(song), :title => song.name, :alt => song.name}= song.name
              - if song.downloadable?
                %td.play_song
                  %object{:height => "17", :width => "17", :data => "/assets/button/musicplayer.swf?&b_colors=80FF00,257b00,80FF00,FF0000&playlist_url=" + song_url(song) + ".xml", :type => "application/x-shockwave-flash"}
                    %param{:value => "/assets/button/musicplayer.swf?playlist_url=" + song_url(song) + ".xml", :name => "movie"}
                    %img{:height => "17", :width => "17", :alt => "play", :src => "/assets/noflash.gif"}
    %tr
      %td.submit= submit_tag 'Update'
  - form_for @show, shows_url, :html => {:method => :delete} do |form|      
    %tr
      %td.submit= submit_tag 'Delete'
